<template>
    <div style="width: 40rem; margin: 2rem">
        <a-card title="前后端接口交互测试" size="small" type="inner">
            <div slot="extra" >
                <a-button type="primary" @click="getUserList">发生请求</a-button>
            </div>
            {{ description }}
        </a-card>
    </div>
</template>

<script>
import {getUserList} from "@/api/login";

export default {
    name: 'HelloWorld',
    data() {
        return {
            description: null
        }
    },
    methods: {
        getUserList() {
            getUserList().then((res) =>{
                this.description = res.data.data[0]
            })
        }
    }
}
</script>
